package net.crowdloud.server.DatabaseAccess.user;

import javax.jdo.PersistenceManager;

public class GetUser {

	public static net.crowdloud.shared.entities.User get(
			PersistenceManager persistenceManager, Long userID) {

		User userDatabase = getUserDatabase(persistenceManager, userID);

		net.crowdloud.shared.entities.User user = ConvertDatabaseToUser
				.getUser(userDatabase);

		return user;
	}

	public static User getUserDatabase(PersistenceManager persistenceManager,
			Long userID) {

		User userDatabase = persistenceManager
				.getObjectById(User.class, userID);

		return userDatabase;
	}

}
